#include <stdio.h>
void inplace_swap(int *x,int *y)
{
	*y=*x ^ *y;
	*x=*x ^ *y;
	*y=*x ^ *y;
}

void reverse_array(int a[],int cnt)
{
	int first,last;
	for(first=0,last=cnt-1;first<last;first++,last--)
		inplace_swap(&a[first],&a[last]);

}

void main ()
{
	int a[10];
	int n,i;
	printf("please input n:\n");
	scanf("%d",&n);
	printf("please input number:\n");
	for(i=0;i<n;i++){
		scanf("%d\n",&a[i]);
	}
	reverse_array(a,n);
	for(i=0;i<n;i++){
	printf("%d ",a[i]);
	}
	printf("\n");

}
